﻿@{
    ViewBag.Title = "VoteManager";
    Layout = "~/Views/Shared/SettingMaster.cshtml";
}
<link href="~/ResStatic/CSS/ActionDetails.css" type="text/css" rel="stylesheet" />
<script src="~/ResStatic/JS/votedetails.js" type="text/javascript"></script>
@model Vote.Web.Models.VoteResultListViewModel
<style type="text/css">
    ul.voteitem {
        list-style-type: upper-latin;
    }

        ul.voteitem li {
            float: left;
            width: 47.5%;
        }

    .voteitem span {
        float: right;
        margin-right: 37%;
    }

    ul.voteresult {
        list-style-type: upper-latin;
    }
</style>
<ul class="breadcrumb">
    <li><a href="javascript:void(0);">菜单</a> <span class="divider">/</span></li>
    <li class="active">统计投票结果<span class="divider">/</span>@Model.ActionName</li>
</ul>

<div class="container-fluid">
    <div class="row-fluid">
        @{
            if (0 == Model.GroupList.Count)
            {
                <div class="alert alert-info">
                    <button data-dismiss="alert" class="close" type="button">×</button>
                    <strong>提示：</strong> 没有人投票!
                </div>
            }
            else
            {
                <div class="actiontitle"><h2>@Model.ActionName<span>活动结束时间:@Model.EndTime</span><span class="pagination"><a id="exorptExcel" tip="+@Model.ActionId+">导出投票结果</a><a id="exorptVotePerson" tip="+@Model.ActionId+" style="margin-left:12px">导出投票明细</a></span></h2></div>
                foreach (var group in Model.GroupList)
                {
                    <div class="span11">
                        <div class="block">
                            <p class="block-heading">@group.Groupname</p>
                            <div class="block-body">
                                <div class="row-fluid">
                                    <ul class="voteitem">
                                        @{
                    foreach (var result in @group.VoteResult)
                    {
                        <li>
                            <p>
                                @result.ItemName
                                <a href="/Setting/Voters/@result.ItemID" title="得票：@result.VoteCount ， 点击查看投票人">
                                    <span class="label label-warning">+@result.VoteCount</span>
                                </a>
                            </p>
                        </li>
                    }
                                        }


                                    </ul>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                        </div>
                    </div>

                }
                <div class="span6">
                    <div class="block">
                        <p class="block-heading">@Model.ActionName</p>
                        <div id="widget1container" class="block-body collapse in">
                            <h5>得票结果：</h5>
                            @{
                foreach (var group in Model.GroupList)
                {
                    @group.Groupname;
                                <ul class="voteresult">
                                    @{
                    foreach (var item in group.VoteResult)
                    {
                        <li>  @item.ItemName 得票： @item.VoteCount</li>
                    }
                                    }
                                </ul>
                }
                            }
                        </div>
                    </div>

                </div>
            }

        }
    </div>
</div>